package com.changgou.goods.feign;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Category;
import com.changgou.goods.pojo.Sku;
import com.changgou.goods.pojo.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @version v1.0
 * @ProjectName: changgou_parent
 * @ClassName: SpuFeign
 * @Description: TODO(一句话描述该类的功能)
 * @Author: Xu Fj
 * @Date: 2020/3/3 22:28
 */
@FeignClient(name = "goods")
public interface GoodsFeign {

        @GetMapping("/spu/findSpuById/{id}")
        public Result<Spu> findSpuById(@PathVariable("id") String id);

        @GetMapping("/sku/spu/{spuid}")
        public List<Sku> findListBySpuId(@PathVariable("spuid") String spuid);

        @GetMapping("/category/{id}")
        public Result<Category> findById(@PathVariable("id") Integer id);
    }
